<%- layout('/backend/layout/default') %>
    <div class="page" id="Page">
        <div class="page-header">
            <ol class="breadcrumb">
                <li><a href="/backend">首页</a></li>
                <li><a href="/backend/workers">员工信息</a></li>
                <li class="active"><a href="#">新增员工</a></li>
            </ol>
            <h2>新增员工</h2>
        </div>
        <div class="page-content">
            <div class="content-container">
                <form class="validform form-horizontal" action="/backend/worker/create" method="post" 
                data-operation="ajax" data-success-mode="redirect"
                data-error-mode="alert">
                    <div class="form-group">
                        <label class="col-lg-1 control-label">姓名</label>
                        <div class="col-lg-6">
                            <input class="form-control" name="name" type="text" placeholder="姓名" validate-rules="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">职位</label>
                        <div class="col-lg-6">
                            <select class="select2 form-control" name="positionId" style="width:100%">
                               <% positions.forEach(function(position){%>
                                    <option value="<%=position.id%>">
                                        <%= position.title %>
                                    </option>
                                <%})%>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label">备注</label>
                        <div class="col-lg-6">
                            <textarea class="form-control" name="remark" placeholder="备注"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-6 col-lg-offset-1">
                            <button type="reset" class="btn btn-default">重置</button>
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>